package com.molyfun.parents.adapter;

import android.support.v4.app.Fragment;

import java.util.List;

/**
 * Created by william(liuchao.hit@gmail.com).
 * Date:10/24/16.
 */
public class MainAskPagerAdapter extends SmartFragmentStatePagerAdapter {
    List<Fragment> fragmentList;

    public void refreshList(List<Fragment> list){
        this.fragmentList = list;
        notifyDataSetChanged();
    }


    public MainAskPagerAdapter(android.support.v4.app.FragmentManager fragmentManager, List<Fragment> fragments) {
        super(fragmentManager);
        this.fragmentList = fragments;
    }

    @Override
    public Fragment getItem(int position) {

        return fragmentList.get(position);
    }

    @Override
    public int getCount() {
        return fragmentList.size();
    }
}